<?php
/**
 * 数据库实例化对象
 * @author Myxf
 *
 */
class M{
	static $_instance;
	
	public function instace() {
		if( ! (self::$_instance instanceof self) ) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	
	private function __clone() {}

    public static function db($name){
        $mdb = new DbModel();
        $mdb->db($name);
        return $mdb;
    }
}